package com.circle.model.module;

import java.io.File;

public class StrBuffer {

    private StringBuffer sBuffer;

    public StrBuffer() {
        sBuffer = new StringBuffer();
    }

    public StringBuffer append(Object str) {
        sBuffer.append(str);
        return sBuffer;
    }
    public StringBuffer appendln(Object str) {
        append(str);
        append("\n");
        return sBuffer;
    }
    public StringBuffer appendln(Object... param) {
        int size = param.length;
        for (int i = 0; i < size; i++) {
            append(param[i]);
        }
        append("\n");
        return sBuffer;
    }
    public StringBuffer appendSeparator(Object str) {
        if(sBuffer.charAt(sBuffer.length()-1)!=File.separatorChar){
            sBuffer.append(File.separatorChar);
        }
        sBuffer.append(str);
        return sBuffer;
    }

    public void clear(){
        sBuffer.delete(0,sBuffer.length());
    }
    public String toString(){
        return sBuffer.toString();
    }

}
